x86 hvm: Enable 6-argument hypercalls
authorKeir Fraser <keir@xen.org>
Wed, 15 Dec 2010 11:17:41 +0000 (11:17 +0000)
committerKeir Fraser <keir@xen.org>
Wed, 15 Dec 2010 11:17:41 +0000 (11:17 +0000)
Enable 6 argument hypercalls for HVMs. The hypercall code handles a
sixth argument in EBP or R9 but the HVM code is not passing the value.

Signed-off-by: Ross Philipson <ross.philipson@citrix.com>
xen/arch/x86/hvm/hvm.c

index 93b724ee050d75d4f894fe9c360c388708bd8697..9f5784216c0d451e3544a4d0121654cc963ca2bc 100644 (file)
@@ -2522,7 +2522,8 @@ static long hvm_vcpu_op(
 }
 
 typedef unsigned long hvm_hypercall_t(
-    unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
+    unsigned long, unsigned long, unsigned long, unsigned long, unsigned long,
+    unsigned long);
 
 #define HYPERCALL(x)                                        \
     [ __HYPERVISOR_ ## x ] = (hvm_hypercall_t *) do_ ## x
@@ -2672,30 +2673,33 @@ int hvm_do_hypercall(struct cpu_user_regs *regs)
 #ifdef __x86_64__
     if ( mode == 8 )
     {
-        HVM_DBG_LOG(DBG_LEVEL_HCALL, "hcall%u(%lx, %lx, %lx, %lx, %lx)", eax,
-                    regs->rdi, regs->rsi, regs->rdx, regs->r10, regs->r8);
+        HVM_DBG_LOG(DBG_LEVEL_HCALL, "hcall%u(%lx, %lx, %lx, %lx, %lx, %lx)",
+                    eax, regs->rdi, regs->rsi, regs->rdx,
+                    regs->r10, regs->r8, regs->r9);
 
         curr->arch.hvm_vcpu.hcall_64bit = 1;
         regs->rax = hvm_hypercall64_table[eax](regs->rdi,
                                                regs->rsi,
                                                regs->rdx,
                                                regs->r10,
-                                               regs->r8); 
+                                               regs->r8,
+                                               regs->r9); 
         curr->arch.hvm_vcpu.hcall_64bit = 0;
     }
     else
 #endif
     {
-        HVM_DBG_LOG(DBG_LEVEL_HCALL, "hcall%u(%x, %x, %x, %x, %x)", eax,
+        HVM_DBG_LOG(DBG_LEVEL_HCALL, "hcall%u(%x, %x, %x, %x, %x, %x)", eax,
                     (uint32_t)regs->ebx, (uint32_t)regs->ecx,
                     (uint32_t)regs->edx, (uint32_t)regs->esi,
-                    (uint32_t)regs->edi);
+                    (uint32_t)regs->edi, (uint32_t)regs->ebp);
 
         regs->eax = hvm_hypercall32_table[eax]((uint32_t)regs->ebx,
                                                (uint32_t)regs->ecx,
                                                (uint32_t)regs->edx,
                                                (uint32_t)regs->esi,
-                                               (uint32_t)regs->edi);
+                                               (uint32_t)regs->edi,
+                                               (uint32_t)regs->ebp);
     }
 
     HVM_DBG_LOG(DBG_LEVEL_HCALL, "hcall%u -> %lx",